home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Bank smakow / BankSmakow.air / BankSmakow.swf / scripts / mx / skins / halo / WindowRestoreButtonSkin.as < prev   
Text File  |  2009-12-16  |  3KB  |  86 lines

  1. package mx.skins.halo
  2. {
  3.    import mx.controls.Image;
  4.    import mx.core.UIComponent;
  5.    import mx.core.mx_internal;
  6.    import mx.states.SetProperty;
  7.    import mx.states.State;
  8.    
  9.    use namespace mx_internal;
  10.    
  11.    public class WindowRestoreButtonSkin extends UIComponent
  12.    {
  13.       
  14.       private static var winRestoreDownSkin:Class = WindowRestoreButtonSkin_winRestoreDownSkin;
  15.       
  16.       private static var winRestoreOverSkin:Class = WindowRestoreButtonSkin_winRestoreOverSkin;
  17.       
  18.       mx_internal static const VERSION:String = "3.5.0.12683";
  19.       
  20.       private static var winRestoreUpSkin:Class = WindowRestoreButtonSkin_winRestoreUpSkin;
  21.        
  22.       
  23.       private var skinImage:Image;
  24.       
  25.       public function WindowRestoreButtonSkin()
  26.       {
  27.          super();
  28.       }
  29.       
  30.       override public function get measuredWidth() : Number
  31.       {
  32.          if(skinImage.measuredWidth)
  33.          {
  34.             return skinImage.measuredWidth;
  35.          }
  36.          return 12;
  37.       }
  38.       
  39.       private function initializeStates() : void
  40.       {
  41.          var _loc1_:State = new State();
  42.          _loc1_.name = "up";
  43.          var _loc2_:SetProperty = new SetProperty();
  44.          _loc2_.name = "source";
  45.          _loc2_.target = skinImage;
  46.          _loc2_.value = winRestoreUpSkin;
  47.          _loc1_.overrides.push(_loc2_);
  48.          states.push(_loc1_);
  49.          var _loc3_:State = new State();
  50.          _loc3_.name = "down";
  51.          var _loc4_:SetProperty;
  52.          (_loc4_ = new SetProperty()).name = "source";
  53.          _loc4_.target = skinImage;
  54.          _loc4_.value = winRestoreDownSkin;
  55.          _loc3_.overrides.push(_loc4_);
  56.          states.push(_loc3_);
  57.          var _loc5_:State;
  58.          (_loc5_ = new State()).name = "over";
  59.          var _loc6_:SetProperty;
  60.          (_loc6_ = new SetProperty()).name = "source";
  61.          _loc6_.target = skinImage;
  62.          _loc6_.value = winRestoreOverSkin;
  63.          _loc5_.overrides.push(_loc6_);
  64.          states.push(_loc5_);
  65.       }
  66.       
  67.       override protected function createChildren() : void
  68.       {
  69.          skinImage = new Image();
  70.          addChild(skinImage);
  71.          initializeStates();
  72.          skinImage.setActualSize(12,13);
  73.          skinImage.move(0,0);
  74.       }
  75.       
  76.       override public function get measuredHeight() : Number
  77.       {
  78.          if(skinImage.measuredHeight)
  79.          {
  80.             return skinImage.measuredHeight;
  81.          }
  82.          return 13;
  83.       }
  84.    }
  85. }
  86.